<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="../includes/webUserAuthenticatedPageStart.jsp" %>
<%
	String strErrPage			= "giris";
	try {
		String processCode 		= (String)session.getAttribute("processCode");
		String processAction	= (String)session.getAttribute("processAction");
		String processParams	= (String)session.getAttribute("processParams");
		String redirectPage		= "";
		
		if ( processCode != null && processAction != null && processParams != null )
		{

			if ( processCode.equals("LOGOUT") )
			{
				JimetSession tmpSession = new JimetSession();
				JimSession.invalidate(request);

				redirectPage			= "/giris"; 
				session.setAttribute("AUTH_MSG","AUTH_LOGOUT"); 
			}
			else
			{
				/*
				if ( 	processCode.equals("CONTRACT_PROJECTS_LIST_ACTION") )
				{	
					redirectPage	=  listActionProcessController.doProcess(processCode, processAction, processParams , session );
					session.removeAttribute("processParams");
				}
				else if ( processCode.equals("UPDATE_CONTROL_LIST") )
					redirectPage	=  listActionProcessController.doProcess(processCode, processAction, processParams , session );
				else
				{
					redirectPage	=  listActionProcessController.doProcess(processCode, processAction, processParams , Lookup );
					session.removeAttribute("processParams");
				}
				*/
				
				redirectPage	=  listActionProcessController.doProcess(processCode, processAction, processParams , Lookup );
				session.removeAttribute("processParams");
	
				if ( redirectPage.equals("") )
					redirectPage = "/admin/1/99/"+tokenKey;
				else
					redirectPage	+= tokenKey;
				session.removeAttribute("processAction");
				session.removeAttribute("processCode");				
			}
						
			response.sendRedirect(request.getContextPath()+redirectPage);	
			return;
		}
	}
	catch(Exception ex){
		response.sendRedirect(request.getContextPath()+"/"+strErrPage);
		return;
	}


%>
